package me.zhengjie.modules.fund.service;

import me.zhengjie.modules.fund.domain.StockNetValue;
import me.zhengjie.modules.fund.domain.UserStock;
import me.zhengjie.modules.fund.service.dto.UserStockDto;
import me.zhengjie.modules.fund.service.dto.UserStockQueryCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.io.IOException;
import java.util.Set;

public interface UserStockService {

    UserStockDto findById(Long id);

    /**
     * 新增
     *
     * @param userStock
     */
    void create(UserStock userStock) throws IOException;

    /**
     * 更新
     *
     * @param resource
     */
    void update(UserStock resource) throws IOException;

    /**
     * 更新股票净值
     *
     * @param stockNetValue
     */
    void updateNetValue(StockNetValue stockNetValue);

    /**
     * 删除
     *
     * @param ids /
     */
    void delete(Set<Long> ids);

    /**
     * 查询
     *
     * @param criteria
     * @return
     */
    Page<UserStockDto> queryAll(UserStockQueryCriteria criteria, Pageable pageable);
}
